package com.fyy.rtspdemo.controller;

import com.fyy.rtspdemo.service.IFlvService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/flv")
public class FLVController {

    @Autowired
    private IFlvService flvService;

    @GetMapping("/test")
    public void open4(HttpServletResponse response, HttpServletRequest request){
        String rstpUrl = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4";
        flvService.open(rstpUrl,response,request);
    }

}
